home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: GNU Interrupts
- Date: 9 Feb 1996 21:57:15 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4fhc3rINN9km@keats.ugrad.cs.ubc.ca>
- References: <schumaker.88.002FB3CD@tigger.jvnc.net> <4f7092$rt1@news.cencom.net>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4f7092$rt1@news.cencom.net>, Bill Wendling <tanp@ns> wrote:
- >Schumaker inexplicably wrote:
-
- >} available?, does linux allow you to call interrupts?, is there one included
- >} which I haven't found?
- >
- >} any info would be greatly appreciated.
- >
- >Linux doesn't use interrupts. That is an MS-DOG invention.
-
- Hahaha. All Linux system calls are accessed via interrupts. There is no other
- way to pass control to the OS (other than causing an exception). It's a good
- thing too---a lot cleaner than call gates.
-
-
- .file "hello.S"
-
- /*
- * compile with gcc -nostdlib -N -s hello.S
- */
-
- #include <sys/syscall.h>
-
- .text
-
- start: movl $SYS_write, %eax /* write() system call code */
- movl $1, %ebx /* stdout one file descriptor */
- movl $hello, %ecx /* pointer to string */
- movl $helloe-hello, %edx /* lenth of string */
- int $0x80 /* call Linux! */
- movl $SYS_exit, %eax /* _exit() system call */
- int $0x80
-
- hello: .ascii "Hello, World!\n"
- helloe:
- --
-
-